﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace WebForm
{
    public partial class LayerShow : System.Web.UI.Page
    {
        private int _t = 1;
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void Button1_Click(object sender, EventArgs e)
        {
            _t = 2;
            //this.Page.ClientScript.RegisterStartupScript(GetType(), "提示", "<script>alert('保存成功')</script>");

            string s = "var index = parent.layer.getFrameIndex(window.name);" + "parent.layer.close(index);";

            //ok1
            //Page.ClientScript.RegisterClientScriptBlock(GetType(), "dd1", "<script>" + s + "</script>");

            //ok2
            //Page.ClientScript.RegisterClientScriptBlock(GetType(), "", "<script>" + s + "</script>");

            //ok3
            //this.Page.ClientScript.RegisterStartupScript(GetType(), "", "<script>" + s + "</script>");

           

           //ok4
            //Page.ClientScript.RegisterStartupScript(ClientScript.GetType(),"mydd","<script>closeBox1();</script>");  
            //ok5
            //ClientScript.RegisterStartupScript(GetType(), "ydd", "<script>closeBox();</script>");

            ClientScript.RegisterStartupScript(GetType(), "", "<script>closeBox();</script>");
        }
    }
}